package parser;

import server.SimpleDB;
import storage.transaction.Transaction;
import metadata.schema.Schema;

public class CreateTableData extends ManipulateData {

	private String tblname;
	private Schema sch;

	public CreateTableData(String table_name, Schema schema) {
		tblname = table_name;
		sch = schema;
	}

	public String tableName() {
		return tblname;
	}

	public Schema newSchema() {
		return sch;
	}

	@Override
	public int execute(Transaction tx) {
		return SimpleDB.uplanner().executeCreateTable(this, tx);
	}

}
